Skip to content

Fix. Settings. Improve psc detect in plugins list. - #720

Merged
svfcode merged 2 commits into
fixfrom
upd-detect-psc
Aug 25, 2026
Merged

Fix. Settings. Improve psc detect in plugins list.#720
svfcode merged 2 commits into
fixfrom
upd-detect-psc

Conversation

@svfcode

@svfcode svfcode commented Aug 25, 2026

Copy link
Copy Markdown
Member

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves plugin vulnerability/PSC detection by deriving a reliable plugin slug from the plugin file path (folder) and/or TextDomain when the WordPress.org slug is missing (common on the installed plugins page when Plugin URI is custom).

Changes:

  • Update VulnerabilityAlarm::getSafePlugins() to pass the plugin file path into getPluginSlug() so slug resolution can fall back to the folder name.
  • Update the admin “installed plugins” row hook to use VulnerabilityAlarm::getPluginSlug() instead of sanitize_title($plugin_data['Name']).
  • Add PHPUnit tests covering slug fallback behavior and version bound matching.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/lib/CleantalkSP/VulnerabilityAlarm/VulnerabilityAlarmTest.php Adds regression tests for slug resolution (folder/TextDomain) and version matching.
lib/CleantalkSP/SpbctWP/VulnerabilityAlarm/VulnerabilityAlarm.php Passes plugin file path into slug resolution when building/checking the safe plugins list.
inc/spbc-admin.php Uses the improved slug resolution on the plugins list to enable checks even when WP.org slugs are absent.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/lib/CleantalkSP/VulnerabilityAlarm/VulnerabilityAlarmTest.php

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@svfcode
svfcode merged commit adb80cf into fix Aug 25, 2026
2 checks passed
@Glomberg
Glomberg deleted the upd-detect-psc branch September 2, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants